package kr.hkit.powerjava.chapter08;

public class DeskLamp {
	private boolean isOn;
	
	public void turnOn()
	{
		this.isOn = true;
	}
	
	public void turnOff()
	{
		this.isOn = false;
	}

	@Override
	public String toString() {
		return "DeskLamp [isOn=" + isOn + "]";
	}
	public static void main(String[] args) {
		DeskLamp lamp = new DeskLamp();
		System.out.println(lamp);
		lamp.turnOn();
		System.out.println(lamp);
		lamp.turnOff();
		System.out.println(lamp);
	}
}


